<h3><%= @count %> objects</h3>
<table>
<tr>
	<% unless model_params[:link_field] %>
		<th valign="top">link</th>
	<% end %>
	<% model_params[:members].each do |member|  %>
		<th valign="top"><%= member.display_name %></th>
  	<% end %>
</tr>
<% for item in model_list %>
	<tr>
		<% unless model_params[:link_field] %>
			<td valign="top">
				<% if model_params[:controller] then %>
					<%= link_to("link", {:controller => model_params[:controller], :action => "show", :id => item}) %>
				<% else %>
					<%= link_to("link", {:action => "show", :id => item}) %>
				<% end %>
			</td>
		<% end %>
		<% model_params[:members].each do |member|  %>
			<td valign="top">
				<% value = display_value(item, member, member.options[:list_limit]) %>
				<% if model_params[:link_field] && (member.field_name == model_params[:link_field]) then %>
					<%= link_to(value.empty? ? "link" : value, {:action => "show", :id => item}) %>
				<% else %>
					<%= value %>
				<% end %>
			</td>
		<% end %>
	</tr>
<% end %>
</table>
<%= pagination_links model_params[:list_pages] if model_params[:list_pages] %>

